package com.gpj.flowable.learn01;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;

/**
 * @className CustomTaskListener
 * @description 自定义任务监听器
 * @author GPJ
 * @date 2024/7/14 下午1:56
 * @version 1.0
 **/
@Slf4j
public class CustomTaskListener implements TaskListener {
	@Override
	public void notify(DelegateTask task) {
		log.info("[learn01.CustomTaskListener]监听器被触发了:{}", task.getEventName());
		if(EVENTNAME_CREATE.equals(task.getEventName())){
			task.setAssignee("wangwu");
		}
	}
}
